using UnityEngine;

// 匕首组件（演示反应系统）
public class Knife : MonoBehaviour
{
    private void OnEnable()
    {
        // 订阅抽卡后的反应
        ActionSystem.SubscribeReaction<DrawCardGA>(DrawCardReaction, ReactionTiming.PRE);
    }

    void OnDisable()
    {
        // 取消订阅
        ActionSystem.UnsubscribeReaction<DrawCardGA>(DrawCardReaction, ReactionTiming.PRE);
    }

    // 抽卡后的反应：造成3点伤害
    private void DrawCardReaction(DrawCardGA drawCardGA)
    {
        DealDamageGA dealDamageGA = new(3);
        ActionSystem.Instance.AddReaction(dealDamageGA);
    }
}
